#ifndef _WINDOW_H_
#define _WINDOW_H_

#include <windows.h>
#include <windowsx.h>

/**
Window represents a single window
*/
class Window
{
public:	
	HWND Wnd(void);
	void SetWnd(HWND wnd);

	HDC Dc(void);
	void SetDc(HDC dc);

	HGLRC Rc(void);
	void SetRc(void);

	int Width(void);
	void SetWidth(int widht);

	int Height(void);
	void SetHeight(int height);

	bool Active(void);
	void SetActive(bool active);

	Window();
	Window(wchar_t *title, int width, int height);
	virtual ~Window();

	bool Create(wchar_t *title, int width, int height);
	bool Destroy(void);			

	static Window& MainWindow(void);
	static void SetMainWindow(Window& mainWindow);

	LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);

private:	
	HWND wnd;
	HDC dc;
	HGLRC rc;
	int width, height;
	bool active;
	wchar_t *className;
	static Window mainWindow;
};

#endif